package com.ym.medical.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ym.core.utils.tkmybatis.BaseSVImpl;
import com.ym.medical.dao.InviteFriendMiddleDao;
import com.ym.medical.domain.entity.InviteFriendMiddleEntity;
import com.ym.medical.domain.param.InviteFriendMiddleParam;
import com.ym.medical.service.IInviteFriendMiddleSV;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * ComputerName:LAPTOP-I6GKDIFQ
 * Author:admin
 * Date: 2019-09-03
 * Time: 10:51:10
 * 服务实现类
 */
@Service
@Transactional( rollbackFor = Exception.class)
public class InviteFriendMiddleSVImpl extends BaseSVImpl<InviteFriendMiddleEntity,InviteFriendMiddleDao> implements IInviteFriendMiddleSV {

    @Override
    public PageInfo<InviteFriendMiddleEntity> listInvite(InviteFriendMiddleParam model, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<InviteFriendMiddleEntity> inviteFriendMiddles = mapper.listInvite(model);
        return new PageInfo<>(inviteFriendMiddles);
    }
}
